<template>
	<view class="columnbox wdh-100 content">
		<!-- <u--form class="wdh-100" labelPosition="top" :model="form" :rules="rules" ref="uForm">
			<view class="one-info rowbox wdh-100">
				<u-form-item label="" prop="shengao" class="wdh-100">
					<view class="info-box wdh-100 rowbox spb">
						<view class="info-title">身高</view>
						<view class="rowbox">
							<input type="digit" v-model="form.shengao" placeholder="请输入" />
							<view class="dw">cm</view>
						</view>
					</view>
				</u-form-item>
			</view>

			<view class="one-info rowbox wdh-100">
				<u-form-item label="" prop="tizhong" class="wdh-100">
					<view class="info-box wdh-100 rowbox spb">
						<view class="info-title">体重</view>
						<view class="rowbox">
							<input type="digit" v-model="form.tizhong" placeholder="请输入" />
							<view class="dw">kg</view>
						</view>
					</view>
				</u-form-item>
			</view>

			<view class="one-info rowbox wdh-100">
				<u-form-item label="" prop="tiwen" class="wdh-100">
					<view class="info-box wdh-100 rowbox spb">
						<view class="info-title">体温</view>
						<view class="rowbox">
							<input type="digit" v-model="form.tiwen" placeholder="请输入" />
							<view class="dw">­°C</view>
						</view>
					</view>
				</u-form-item>
			</view>

			<view class="one-info rowbox wdh-100">
				<u-form-item label="" prop="xinlu" class="wdh-100">
					<view class="info-box wdh-100 rowbox spb">
						<view class="info-title">心率</view>
						<view class="rowbox">
							<input type="digit" v-model="form.xinlu" placeholder="请输入" />
							<view class="dw">­bpm</view>
						</view>
					</view>
				</u-form-item>
			</view>

			<view class="one-info rowbox wdh-100">
				<u-form-item label="" prop="shousuoya" class="wdh-100">
					<view class="info-box wdh-100 rowbox spb">
						<view class="info-title">收缩压</view>
						<view class="rowbox">
							<input type="digit" v-model="form.shousuoya" placeholder="请输入" />
							<view class="dw">­mmHg</view>
						</view>
					</view>
				</u-form-item>
			</view>

			<view class="one-info rowbox wdh-100">
				<u-form-item label="" prop="shuzhangya" class="wdh-100">
					<view class="info-box wdh-100 rowbox spb">
						<view class="info-title">舒张压</view>
						<view class="rowbox">
							<input type="digit" v-model="form.shuzhangya" placeholder="请输入" />
							<view class="dw">­mmHg</view>
						</view>
					</view>
				</u-form-item>
			</view>
		</u--form> -->

		<view class="one-info rowbox wdh-100">
			<view class="info-box wdh-100 rowbox spb">
				<view class="info-title">身高</view>
				<view class="rowbox">
					<input type="digit" v-model="form.shengao" placeholder="请输入" />
					<view class="dw">cm</view>
				</view>
			</view>
		</view>

		<view class="one-info rowbox wdh-100">
			<view class="info-box wdh-100 rowbox spb">
				<view class="info-title">体重</view>
				<view class="rowbox">
					<input type="digit" v-model="form.tizhong" placeholder="请输入" />
					<view class="dw">kg</view>
				</view>
			</view>
		</view>

		<view class="one-info rowbox wdh-100">
			<view class="info-box wdh-100 rowbox spb">
				<view class="info-title">体温</view>
				<view class="rowbox">
					<input type="digit" v-model="form.tiwen" placeholder="请输入" />
					<view class="dw">­°C</view>
				</view>
			</view>
		</view>

		<view class="one-info rowbox wdh-100">
			<view class="info-box wdh-100 rowbox spb">
				<view class="info-title">心率</view>
				<view class="rowbox">
					<input type="digit" v-model="form.xinlu" placeholder="请输入" />
					<view class="dw">­bpm</view>
				</view>
			</view>
		</view>

		<view class="one-info rowbox wdh-100">
			<view class="info-box wdh-100 rowbox spb">
				<view class="info-title">收缩压</view>
				<view class="rowbox">
					<input type="digit" v-model="form.shousuoya" placeholder="请输入" />
					<view class="dw">­mmHg</view>
				</view>
			</view>
		</view>

		<view class="one-info rowbox wdh-100">
			<view class="info-box wdh-100 rowbox spb">
				<view class="info-title">舒张压</view>
				<view class="rowbox">
					<input type="digit" v-model="form.shuzhangya" placeholder="请输入" />
					<view class="dw">­mmHg</view>
				</view>
			</view>
		</view>


		<view class="wdh-100" style="height: 170rpx;"></view>
		<view class="bottom-box wdh-100 rowbox ">
			<view v-if="submitflag" class="rowbox send-btn wdh-100" style="background: #f6f7fb;color:  #96949e;">
				保存
			</view>
			<view v-else class="rowbox send-btn wdh-100" @click="submitInfo">
				保存
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					shengao: '',
					tizhong: '',
					tiwen: '',
					xinlu: '',
					shousuoya: '',
					shuzhangya: ''
				},
				rules: {
					'shengao': {
						type: 'string',
						required: true,
						message: '请填写身高',
						trigger: ['blur', 'change']
					},
					'tizhong': {
						type: 'string',
						required: true,
						message: '请填写体重',
						trigger: ['blur', 'change']
					},
					'tiwen': {
						type: 'string',
						required: true,
						message: '请填写体温',
						trigger: ['blur', 'change']
					},
					'xinlu': {
						type: 'string',
						required: true,
						message: '请填写心率',
						trigger: ['blur', 'change']
					},
					'shousuoya': {
						type: 'string',
						required: true,
						message: '请填写收缩压',
						trigger: ['blur', 'change']
					},
					'shuzhangya': {
						type: 'string',
						required: true,
						message: '请填写舒张压',
						trigger: ['blur', 'change']
					}
				},
				submitflag: false
			};
		},
		methods: {
			submitInfo() {
				// this.$refs.uForm.validate().then(res => {
				// 	let pages = getCurrentPages(); //获取所有页面栈实例列表
				// 	let nowPage = pages[pages.length - 1]; //当前页页面实例
				// 	let prevPage = pages[pages.length - 2]; //上一页页面实例
				// 	prevPage.$vm.examInfo = this.form
				// 	uni.navigateBack()
				// }).catch(errors => {})
				let pages = getCurrentPages(); //获取所有页面栈实例列表
				let nowPage = pages[pages.length - 1]; //当前页页面实例
				let prevPage = pages[pages.length - 2]; //上一页页面实例
				prevPage.$vm.examInfo = this.form
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		background: #F5F8FB;
		min-height: 100vh;
		justify-content: flex-start;
		font-family: PingFang SC;
	}

	.one-info {
		background: #fff;
		padding: 32rpx 20rpx;
		border-bottom: #f6f7fb solid 1px;
	}

	.info-box {

		font-size: 28rpx;
		color: #202020;

		input {
			font-size: 28rpx;
			text-align: right;
			margin-right: 20rpx;
		}
	}

	.info-title {}

	.dw {
		color: #50616d;
	}
</style>